#-*-encoding=utf-8-*-
name=u"""propertysheet"""
title=u""""""
description=u""""""
fields=(
    GrowingTableField(
        title=u'发布内容',
        write_condition=u'',
        default_value_exp=u'[]',
        name=u'locations'
,
fields=[
    FolderSelectField(
        title=u'左侧列',
        write_condition=u'',
        default_value_exp=u'None',
        name=u'left'
),
    FolderSelectField(
        title=u'右侧列',
        write_condition=u'',
        default_value_exp=u'None',
        name=u'right'
),
    TextLineField(
        title=u'说明',
        write_condition=u'',
        size=18,
        default_value_exp=u'""',
        name=u'comment'
)
]
)
,)

fields_validation_script=ur"""
for record in IFieldStorage(sheet)['locations']:
    left, right = record.get('left'), record.get('right')
    if left:
        folder = intids.getObject(left)
        IGrantManager(folder).grantRole('zopen.Reader', 'zope.anybody')
    if right:
        folder = intids.getObject(right)
        IGrantManager(folder).grantRole('zopen.Reader', 'zope.anybody')
return {}
"""
